package com.karst.essentials.chapter02.inherit
{
	public class InheritClass
	{
		public function InheritClass()
		{
			createBasicClass() ;
			createSubClass() ;
		}

		private var basicClass : BasicClass = null ;
		private function createBasicClass() : void
		{
			if( basicClass == null )
				basicClass = new BasicClass() ;
			basicClass.doSomething() ;
		}
		
		private var subClass : SubClass = null ;
		private function createSubClass() : void
		{
			if( subClass == null )
				subClass = new SubClass() ;
			subClass.doSomething() ;
			subClass.saySomething() ;
		}
	}
}